package com.saibo.spider.gather.service;

import java.lang.management.ManagementFactory;

import com.sun.management.OperatingSystemMXBean;

public class ThreadSinaBlogService extends Thread{

	String url ;
	
	public ThreadSinaBlogService(String url){
		this.url = url;
	}
	
	public void run(){
		//MouldSinaBlog sinablog = new MouldSinaBlog();
		//sinablog.connection(url);
		//System.out.println(url);
		StringBuffer sb=new StringBuffer();  
	    OperatingSystemMXBean osmb = (OperatingSystemMXBean) ManagementFactory  
	            .getOperatingSystemMXBean();  
	       sb.append("系统物理内存总计：" + osmb.getTotalPhysicalMemorySize()  
	            / 1024 / 1024 + "MB<br>");  
	       sb.append("系统物理可用内存总计：" + osmb.getFreePhysicalMemorySize()  
	            / 1024 / 1024 + "MB");  
	      System.out.println(sb.toString());
		try {
			Thread.sleep(5*1000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}
	
}
